package demo.spring.restful.domain;

public final class Computer {
	private long id;
    
    private String name;
      
    private String CPU;
    private int disk;
    private double price;
 
    public Computer(){
        id=0;
    }
     
    public Computer(long id, String name, String CPU,int disk,double price){
        this.id = id;
        this.name = name;
        this.CPU = CPU;
        this.disk = disk;
        this.setPrice(price);
    }
     
   
 
    public long getId() {
		return id;
	}






	public void setId(long id) {
		this.id = id;
	}






	public String getName() {
		return name;
	}






	public void setName(String name) {
		this.name = name;
	}






	public String getCPU() {
		return CPU;
	}






	public void setCPU(String cPU) {
		CPU = cPU;
	}






	public int getDisk() {
		return disk;
	}






	public void setDisk(int disk) {
		this.disk = disk;
	}


	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}



	@Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Computer other = (Computer) obj;
        if (id != other.id)
            return false;
        return true;
    }
 
    @Override
    public String toString() {
        return "Computer [id=" + id + ", name=" + name + ", CPU=" + CPU
                + ", disk=" + disk + "G,+price="+"RMB]";
    }

	
 

}
